/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.nodes.objects;

import java.beans.IntrospectionException;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Canvas;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.VisualObject;
import pl.edu.amu.wmi.kino.visualjavafx.nodes.objects.helpers.JavaFxChildren;
import pl.edu.amu.wmi.kino.visualjavafx.nodes.objects.helpers.JavaFxNode;

/**
 *
 * @author psychollek
 */
public class CanvasNode extends JavaFxNode<Canvas>{

    public CanvasNode(Canvas canvas) throws IntrospectionException {
        super(canvas, new CanvasChildren(canvas));
    }

}

class CanvasChildren extends JavaFxChildren<VisualObject>{

    private Canvas canvas;

    CanvasChildren(Canvas canvas) {
        this.canvas = canvas;
    }

    @Override
    public void addNotify(){
        this.setKeys(canvas.getContent());
    }

}